/**
 * 
 */
package com.aaron.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

/**
 * Service for working with documents on the server
 * @author aaron
 *
 */
public interface DocumentService extends RemoteService {

	public static final String SERVICE_URI = "/VivCode/document";

	public static class Util {

		public static DocumentServiceAsync getInstance() {

			DocumentServiceAsync instance = (DocumentServiceAsync) GWT
					.create(DocumentService.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint( SERVICE_URI);
			return instance;
		}
	}
	public Document getDocument(String path, String auth);
	public void setDocument(Document document, String auth);
	public void mergeDocument(Document document, String auth);

}
